<html>
  <head>
    <title></title>
    <style></style>
    <script type="text/tiscript">
    
    function PasswordPlus(pwd,toggler) {
      toggler.onValueChanged = function() {
        var t = pwd.value;
        pwd.attributes["type"] = this.value ? "text" : "password";
        pwd.value = t;
      }
    }
    PasswordPlus( $(input#password), $(button.password-toggle) );
    </script>
  </head>
<body>

<widget>
  <input type=password #password> <button type=checkbox class=password-toggle>reveal password</button>
</widget>

</body>
</html>
